//
//  GRPayManager.h
//  YC_GRice
//
//  Created by LiuFeng on 2018/7/10.
//  Copyright © 2018年 YeCai. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AlipaySDK/AlipaySDK.h>
#import <WXApi.h>

@protocol GRPayManagerDelegate <NSObject>

@optional
/**
 微信支付

 @param payResp <#payResp description#>
 */
- (void)wechatPayResp:(BaseResp *)payResp;

/**
 支付宝支付

 @param resultDic <#resultDic description#>
 */
- (void)alipayResultDic:(NSDictionary *)resultDic;


@end

@interface GRPayManager : NSObject

@property (nonatomic, weak) id <GRPayManagerDelegate> delegate;

/**
 支付单例（支付宝/微信）

 @return return value description
 */
+ (instancetype)sharePay;



/**
 wechat配置
 */
+ (void)PaySDK;


/**
 Third party jump callback. return NO if application can't open for some reason

 @param application <#application description#>
 @param url <#url description#>
 */
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url;



/**
 微信支付

 @param option <#option description#>
 */
+ (void)WeChatPay:(NSDictionary *)option;



/**
 微信授权（获取信息）

 @param currentVc <#currentVc description#>
 @param completion <#completion description#>
 */
+ (void)WechatAuth_WithViewController:(UIViewController *)currentVc completion:(void(^)(UMSocialUserInfoResponse *response))completion;


/**
 支付宝支付

 @param orderStr <#orderStr description#>
 */
- (void)aliPay:(NSString *)orderStr;


/**
 支付宝授权（获取信息）

 @param infoStr 授权infostr
 @param completion <#completion description#>
 */
+ (void)AlipayAuth_V2WithInfo:(NSString *)infoStr completion:(CompletionBlock)completion;



@end
